3.27 \(\int (a+a \sin (c+d x))^3 \tan (c+d x) \, dx\)

Optimal. Leaf size=70 \[ -\frac{a^3 \sin ^3(c+d x)}{3 d}-\frac{3 a^3 \sin ^2(c+d x)}{2 d}-\frac{4 a^3 \sin (c+d x)}{d}-\frac{4 a^3 \log (1-\sin (c+d x))}{d} \]

[Out]

(-4*a^3*Log[1 - Sin[c + d*x]])/d - (4*a^3*Sin[c + d*x])/d - (3*a^3*Sin[c + d*x]^2)/(2*d) - (a^3*Sin[c + d*x]^3
)/(3*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0449772, antiderivative size = 70, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {2707, 77} \[ -\frac{a^3 \sin ^3(c+d x)}{3 d}-\frac{3 a^3 \sin ^2(c+d x)}{2 d}-\frac{4 a^3 \sin (c+d x)}{d}-\frac{4 a^3 \log (1-\sin (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Sin[c + d*x])^3*Tan[c + d*x],x]

[Out]

(-4*a^3*Log[1 - Sin[c + d*x]])/d - (4*a^3*Sin[c + d*x])/d - (3*a^3*Sin[c + d*x]^2)/(2*d) - (a^3*Sin[c + d*x]^3
)/(3*d)

Rule 2707

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^(m - (p + 1)/2))/(a - x)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& EqQ[a^2 - b^2, 0] && IntegerQ[(p + 1)/2]

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rubi steps

\begin{align*} \int (a+a \sin (c+d x))^3 \tan (c+d x) \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x (a+x)^2}{a-x} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac{\operatorname{Subst}\left (\int \left (-4 a^2+\frac{4 a^3}{a-x}-3 a x-x^2\right ) \, dx,x,a \sin (c+d x)\right )}{d}\\ &=-\frac{4 a^3 \log (1-\sin (c+d x))}{d}-\frac{4 a^3 \sin (c+d x)}{d}-\frac{3 a^3 \sin ^2(c+d x)}{2 d}-\frac{a^3 \sin ^3(c+d x)}{3 d}\\ \end{align*}

Mathematica [A]  time = 0.045258, size = 52, normalized size = 0.74 \[ -\frac{a^3 \left (2 \sin ^3(c+d x)+9 \sin ^2(c+d x)+24 \sin (c+d x)+24 \log (1-\sin (c+d x))\right )}{6 d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sin[c + d*x])^3*Tan[c + d*x],x]

[Out]

-(a^3*(24*Log[1 - Sin[c + d*x]] + 24*Sin[c + d*x] + 9*Sin[c + d*x]^2 + 2*Sin[c + d*x]^3))/(6*d)

________________________________________________________________________________________

Maple [A]  time = 0.051, size = 85, normalized size = 1.2 \begin{align*} -{\frac{{a}^{3} \left ( \sin \left ( dx+c \right ) \right ) ^{3}}{3\,d}}-4\,{\frac{{a}^{3}\sin \left ( dx+c \right ) }{d}}+4\,{\frac{{a}^{3}\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{d}}-{\frac{3\,{a}^{3} \left ( \sin \left ( dx+c \right ) \right ) ^{2}}{2\,d}}-4\,{\frac{{a}^{3}\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(d*x+c))^3*tan(d*x+c),x)

[Out]

-1/3*a^3*sin(d*x+c)^3/d-4*a^3*sin(d*x+c)/d+4/d*a^3*ln(sec(d*x+c)+tan(d*x+c))-3/2*a^3*sin(d*x+c)^2/d-4/d*a^3*ln
(cos(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 1.07111, size = 77, normalized size = 1.1 \begin{align*} -\frac{2 \, a^{3} \sin \left (d x + c\right )^{3} + 9 \, a^{3} \sin \left (d x + c\right )^{2} + 24 \, a^{3} \log \left (\sin \left (d x + c\right ) - 1\right ) + 24 \, a^{3} \sin \left (d x + c\right )}{6 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(d*x+c))^3*tan(d*x+c),x, algorithm="maxima")

[Out]

-1/6*(2*a^3*sin(d*x + c)^3 + 9*a^3*sin(d*x + c)^2 + 24*a^3*log(sin(d*x + c) - 1) + 24*a^3*sin(d*x + c))/d

________________________________________________________________________________________

Fricas [A]  time = 1.51562, size = 147, normalized size = 2.1 \begin{align*} \frac{9 \, a^{3} \cos \left (d x + c\right )^{2} - 24 \, a^{3} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \,{\left (a^{3} \cos \left (d x + c\right )^{2} - 13 \, a^{3}\right )} \sin \left (d x + c\right )}{6 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(d*x+c))^3*tan(d*x+c),x, algorithm="fricas")

[Out]

1/6*(9*a^3*cos(d*x + c)^2 - 24*a^3*log(-sin(d*x + c) + 1) + 2*(a^3*cos(d*x + c)^2 - 13*a^3)*sin(d*x + c))/d

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} a^{3} \left (\int 3 \sin{\left (c + d x \right )} \tan{\left (c + d x \right )}\, dx + \int 3 \sin ^{2}{\left (c + d x \right )} \tan{\left (c + d x \right )}\, dx + \int \sin ^{3}{\left (c + d x \right )} \tan{\left (c + d x \right )}\, dx + \int \tan{\left (c + d x \right )}\, dx\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(d*x+c))**3*tan(d*x+c),x)

[Out]

a**3*(Integral(3*sin(c + d*x)*tan(c + d*x), x) + Integral(3*sin(c + d*x)**2*tan(c + d*x), x) + Integral(sin(c
+ d*x)**3*tan(c + d*x), x) + Integral(tan(c + d*x), x))

________________________________________________________________________________________

Giac [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(d*x+c))^3*tan(d*x+c),x, algorithm="giac")

[Out]

Timed out